<!--  -->
<template>
  <div class="container">
    <navbar
      class="de-navbar"
      :vaniconL="true"
      :noRight="true"
      :noLeft="false"
      :vaniconR="true"
      iconNameL="arrow-left"
      iconNameR="setting-o"
      @clickLeft="goBack"
      bgcolor="rgb(55, 81, 255) !important"
      bgImage="linear-gradient(rgb(55, 81, 255) 0%, rgb(76, 99, 255) 50%, rgb(91 112 255) 75%, rgb(107 127 255) 100%) !important"
      >个人信息</navbar
    >
    <div style="height: 0.45rem"></div>
    <div class="set">
      <van-cell class="head" title="头像" is-link>
        <template #right-icon>
          <el-upload
            class="upload-demo"
            action="https://ds.pushiyixue.com/ds/upload/wx_appsimage"
            accept="image/*"
            :show-file-list="false"
            :limit="1"
          >
            <img
              class="headimg"
              :src="require('@/assets/images/mine1.png')"
              alt=""
            />
            <van-icon name="arrow" size="0.16rem" color="#969799" />
          </el-upload>
        </template>
      </van-cell>
      <van-cell title="用户名" :value="userDatas.name" />
      <van-cell title="手机号" :value="userDatas.phone" />
      <van-cell title="性别" :value="userDatas.gender" />
      <van-cell title="年龄" :value="userDatas.age" />
      <van-cell title="医院" :value="userDatas.hospitalName" />
      <van-cell title="科室" :value="userDatas.departmentName" />
      <van-cell title="职称" :value="userDatas.post" />
      <van-cell title="介绍" :value="userDatas.introduction" />
      <van-cell title="擅长" :value="userDatas.skilled" />
    </div>
  </div>
</template>

<script>
import navbar from "@/components/navbar";
import { Toast, Dialog, Collapse, CollapseItem } from "vant";
import { mapGetters } from "vuex";
export default {
  name: "doctorPerson",
  data() {
    return {
      activeNames: ["0"],
    };
  },

  components: { navbar },

  computed: {
    ...mapGetters(["userData"]),
  },

  created() {
    this.userDatas = JSON.parse(this.userData);
    console.log(this.userDatas);
  },
  mounted() {},

  methods: {
    // 返回上一页
    goBack() {
      this.$router.replace({ path: "/dMine" });
    },
  },
};
</script>
<style lang='scss' scoped>
@import "../../assets/css/utils";
.container {
  position: relative;
  height: 100%;
  background: #f5f5f5;
  & .set {
    width: 100%;
    // background: #fff;
    margin: auto;
    margin-top: 10px;
    border-radius: 10px;
    padding-bottom: 0.2rem;
    & .head {
      display: flex;
      flex-direction: row;
      align-items: center;
    }
    & .headimg {
      width: 0.4rem;
      height: 0.4rem;
      border-radius: 50%;
    }
    & /deep/ .el-upload {
      display: flex;
      flex-direction: row;
      align-items: center;
    }
  }
  & .van-button {
    width: 94%;
    margin: auto;
    margin-top: 0.2rem;
  }
  & .van-password-input {
    margin-top: 0.1rem;
  }
}
.van-cell__title {
  text-align: left;
}
</style>